package cs4game;

public abstract class Entity {
	protected Vector3D pos;
	protected World world;
	protected BoundingBox box;
	
	public abstract void draw();
	public Vector3D getPos(){return pos;}
	public BoundingBox shiftedBoundingBox() {
		return box.shifted(pos);
	}
	
	public BoundingBox relativeBoundingBox(){
		return box;
	}
	
	public boolean collidesWithEntity(Entity other) {
		return this.shiftedBoundingBox().intersects(other.shiftedBoundingBox());
	}
}
